%erf(x)=2/pi^(1/2)*int(exp(-x^2),0,x)
a=2/pi^(1/2);
ret_quad=1:10;
ret_erf=1:10;
f=@(x)a.*exp(-(x.^2));
format long
for k=1:10
    ret_quad(k)=quad(f,0,k/10);
    ret_erf(k)=erf(k/10);
end
ret_quad
ret_erf
format default